package vn.com.epi.log.Import;

public class ArticleRecord {
	
    private long timestamp;
    private int categoryId;
    private int totalCount;
    
    public ArticleRecord() {        
    }
    
    public ArticleRecord(String logLine) {
        String[] chunks = logLine.split(",");
        timestamp = Long.parseLong(chunks[0]);
        if (chunks[1].length() == 36)
            categoryId = 0;
        else
            categoryId = Integer.parseInt(chunks[4]);
        totalCount = 1;
    }
    
    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

}